Skip to content

Preserve installed TOD fingerprint libraries during setup - #15324

Closed
arrow255 wants to merge 1 commit into
omacom:quattrofrom
arrow255:fix/preserve-tod-fingerprint-backends
Closed

arrow255 wants to merge 1 commit into
omacom:quattrofrom
arrow255:fix/preserve-tod-fingerprint-backends

Conversation

@arrow255

Copy link
Copy Markdown

Summary

  • Preserve an explicitly installed libfprint-tod or libfprint-tod-git instead of requesting the conflicting libfprint-git during fingerprint setup.
  • Keep the existing default libfprint-git fprintd usbutils transaction, including --needed --ask 4 --. With TOD already installed, request only the standard daemon/client and USB tools.
  • Return a nonzero status when enrollment verification fails, before PAM or lock setup.
  • Cover both TOD variants, missing clients, verification failure and the existing library-repair migration. No production migration change is needed: both TOD packages provide libfprint.

This addresses dependency selection for a user-chosen fingerprint library. Driver installation, hardware detection and vendor fixes are separate work.

Related: #12588 (its package-conflict aspect), #7483.

Relationship to #11840

Checked against #11840 at 417236e685a55e8e14f651fd34cdcd039397a5b9.

That PR preserves fprintd-clients / fprintd-clients-git when selecting the daemon/client package; this PR preserves the TOD library. Its current diff still requests libfprint-git, so it does not cover this case.

Both edit the same package-array block and package test file, so there is a textual overlap. A local composition fixture combining its exact client-selection block with this library-selection logic passed 24 checks, including both TOD variants with both alternate client packages and missing USB tools. Whichever lands second needs a rebase that keeps both selections; this PR does not include #11840's implementation.

Validation

Base: quattro at 492b8837deea69663c7a5418871f07ed075a9686.

  • Focused package/migration/polkit tests: 22 checks passed.
  • New TOD, TOD-git and failed-verification controls each reproduce the expected failure against the unmodified base.
  • git diff --check and Bash syntax checks passed.
  • Complete ./test/all runs on both the pristine base and this change: CLI passed; shell reported the same 4 failures among 398 test files, and the same 37 files containing skipped checks. No additional failing files.
  • Source tests ran as an ordinary user, headlessly with Qt offscreen/Basic, checkout commands first on PATH, and inherited XDG home/runtime overrides unset.

The four baseline failures were investigated:

Test Existing mismatch
menu-guards-test.sh Dock autohide/position readers occur repeatedly in the menu but are absent from GUARD_READERS.
plugin-validate-test.sh Validator now allows tray; the test still expects the old three-section error text.
webapp-install-test.sh Test expects no window class for a custom webapp Exec; current implementation emits the URL's class intentionally.
webp-background-migration-test.sh Fixture names 2-swirl-buck, while the bundled replacement is 3-swirl-buck.webp.

Diagnostic-only test copies correcting these mismatches passed. These unrelated files are unchanged in this PR. The complete suite is not claimed green; keeping the PR draft makes that limitation explicit.

Physical evidence on a Dell XPS 13 9300 / Goodix 27c6:533c: an installed TOD stack completed enrollment, repeated verification, sudo/polkit/lock fingerprint authentication and password fallback. That machine needs a separate vendor module and experimental local memory-lifetime workaround; neither is included here.

Prepared with Codex, with physical authentication checks performed by the author.

Keep both TOD package variants, retain the default dependency transaction, and report failed verification before authentication setup. Cover the installed libraries and the existing repair migration with regression tests.
@arrow255
arrow255 marked this pull request as ready for review October 13, 2026 16:07
@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Fingerprint setup preserves an installed libfprint-tod or libfprint-tod-git instead of requesting libfprint-git.

  • Fingerprint setup keeps an installed TOD library.
  • Fingerprint verification must pass before authentication setup continues.

Reviews (1) · Last reviewed commit: "Preserve installed TOD libraries during ..." · Reviewed by Greptile

@omarchybot omarchybot added the bug Something isn't working label Oct 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for the careful write-up, @arrow255. I reviewed this at d1e7bdb0 against quattro and compared it with the other open pull requests that fix the same eviction. The bug is real: libfprint-git conflicts with libfprint, every TOD or fork package provides libfprint, so --ask 4 removes the only working driver without asking.

This one is not the fix to bring forward. #12833 fixes the same bug and was opened first (it carries on #11846 from 2026-09-14). It is also broader: it asks pacman who owns /usr/lib/libfprint-2.so.2 and keeps any owner other than stock libfprint or libfprint-git. The check here at bin/omarchy-setup-security-fingerprint:74 only recognizes packages that are, or provide, libfprint-tod / libfprint-tod-git. A fork such as libfprint-goodix53x5 (the case in #11899) or libfprint-goodixtls511-git provides libfprint without either TOD name, so this branch still asks for libfprint-git and evicts it. #12833 has already been reproduced with real pacman on a disposable Omarchy worker and is labelled verified. #12110 and #15533 are two more fixes for the same bug.

What this adds is worth keeping, and it is going into #12833. That is the exit 1 after "Verification failed". Without it the script exits 0, and omarchy-launch-floating-terminal-with-presentation hands that to omarchy-show-done, which then shows "Done!" for a setup that stopped before configuring PAM. #12833 does not have this. It is now queued to be added to #12833 in that pull request's own review, with you credited as co-author.

What was checked: I read the diff, the setup script, the migration it tests and the helpers it calls, and compared the four competing diffs. I did not run tests on a worker, because the comparison was settled before that point and this branch is not the one going forward. Codex Medium gave a second opinion through omabot review. It made the same comparison and agreed that this guard misses forks without a TOD name. It agreed separately that the exit 1 fixes a real "Done!"-on-failure defect that #12833 and #12110 both inherit. It leaned toward #12110 as the oldest pull request; #12833's fix dates from #11846, which is older still, and #12110 also bundles an unrelated change to the PAM gate polarity. Independence between the two reviews is not guaranteed.

This is waiting on the maintainer, who chooses among the competing fixes.

@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks @arrow255. #12833 merged today as 1bcb85e and keeps any libfprint fork during setup by checking who owns /usr/lib/libfprint-2.so.2, which includes the libfprint-tod and libfprint-tod-git packages this names. The other change here, exiting 1 after a failed verification, is already on quattro. This was closed at the maintainer's request after a review of every open fingerprint pull request. Fable 5 in Claude Code read it against today's quattro; no second model checked the closure, so reopen it if this reads your change wrong.

@omarchybot omarchybot closed this Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants